<?php echo Nina_Links::form(Nina_Links::url($this->getName(), "editSettings"), 'POST', 'edit_settings', 'settings') ?>
	<table>
		<?php
		if($settings = Setting::getAll()):
			foreach ($settings as $setting): ?>
				<tr>
					<th><?php echo Setting::toDescription($setting->getProperty()) ?></th>
					<td>
						<?php if($setting->getTextarea()): ?>
							<textarea name="<?php echo $setting->getProperty() ?>"><?php echo $setting->getValue() ?></textarea>
						<?php elseif($setting->getCheckbox()): ?>
							<input type="checkbox" name="<?php echo $setting->getProperty() ?>" value="1" <?php if($setting->getValue()) echo 'checked="checked"' ?> />
						<?php else: ?>
							<input type="text" name="<?php echo $setting->getProperty() ?>"
								value="<?php echo $setting->getValue() ?>" maxlength="128" />
						<?php endif ?>
					</td>
				</tr>
			<?php endforeach ?>
		<?php endif ?>
		<tr>
			<th><input type="text" name="new_property" maxlength="128" /></th>
			<td><input type="text" name="new_value" maxlength="240" /></td>
		</tr>
		<tr>
			<td><input type="checkbox" name="domain_only" /> This Domain Only</td>
			<td align="right"><input type="submit" name="submit" value="Save Settings" title="Save Settings" /></td>
		</tr>
	</table>
</form>